<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 
<jsp:useBean id="now" class="java.util.Date" /> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>	
<script type="text/javascript" src="<%=basePath %>/login/scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<%=basePath %>/login/scripts/jquery.quickpaginate.js"></script>
<script type="text/javascript">
	$(function(){
		$("#dataTable tbody tr").quickpaginate({ perpage: 10, pager : $("#temp") });
	});
	function order(fieldname){
		$("#orderBy").val(fieldname);
		$("form:first").submit(); 
	}
</script>
<link rel="stylesheet" type="text/css" href="<%=basePath%>/login/css/style.css" />
<style type="text/css">
th{
	color:#375B91;
}
</style>
<div id="content2">
		<div id="box2">
			<div>
				<h3>
					当前位置&nbsp;:&nbsp;自动站数据监测&nbsp;>>&nbsp;历史数据查询&nbsp;>>&nbsp;雨量查询报表
				</h3>
			</div>
			<div id="search_bar2">
			<form action="zdzReportAction!reportRain.action" method="post">
			<table width="420" border="0" cellpadding="0" cellspacing="3">
					<tr>
						<td width="40">
							日期:
						</td>
						<td width="80">
						<input name="date" onfocus="calendar()" value="${date}"/>
						</td>
						<td width="40">
							时间:
						</td>
						<td width="80">
						<s:select name="hour" list="#{'1':'1时','2':'2时','3':'3时','4':'4时','5':'5时','6':'6时','7':'7时','8':'8时','9':'9时','10':'10时','11':'11时','12':'12时','13':'13时','14':'14时','15':'15时','16':'16时','17':'17时','18':'18时','19':'19时','20':'20时','21':'21时','22':'22时','23':'23时','24':'24时'}"  theme="simple"></s:select>
						</td>
						<td width="40">
							分:
						</td>
						<td width="80">
						<s:select name="minute" list="#{'0':'0分','5':'5分','10':'10分','15':'15分','20':'20分','25':'25分','30':'30分','35':'35分','40':'40分','45':'45分','50':'50分','55':'55分','60':'60分'}"  theme="simple"></s:select>
						</td>
						<td>
							<input id="orderBy" type="hidden" name="orderByBean.orderByFile" value="${orderByBean.orderByFile}"/>
							<input type="hidden" name="orderByBean.orderByMethod" value="${orderByBean.orderByMethod}"/>
							<input type="submit" value="查询" />
							<input type ="button" value="最新" onclick="javascript:location.reload()"/>
						</td>
					</tr>
				</table>
				<input type="button" value="上一条记录雨量" onclick="javascript:location.href='zdzReportAction!reportRainPrev.action?date=${date }&hour=${hour}&minute=${minute}'"/>
				<input type="button" value="下一条记录雨量" onclick="javascript:location.href='zdzReportAction!reportRainNext.action?date=${date }&hour=${hour}&minute=${minute}'" />
				</form>
	    </div>
	    <div style="color: blue;font-weight: bold;font-size: 18px;">${reportTitle }</div>
	    
			<table id="dataTable"> 
				<thead>
					<tr>
						<th colspan="2">自动站点</th>
						<th colspan="12">5分钟雨量</th>
						<th rowspan="2" width="50px"><a href="javascript:order('hourrf')" class="order">过去<br>一小时雨量</a></th>
						<th rowspan="2" width="50px"><a href="javascript:order('threehourrf')" class="order">过去<br>三小时雨量</a></th>
						<th rowspan="2" width="50px"><a href="javascript:order('dayrf')" class="order">24小时<br>累计<br>雨量</a></th>
					</tr>
					<tr>
						<th><a href="javascript:order('id')" class="order">代号</a></th>
						<th>站名</th>
						<th>01-05分钟</th>
						<th>06-10分钟</th>
						<th>11-15分钟</th>
						<th>16-20分钟</th>
						<th>21-25分钟</th>
						<th>26-30分钟</th>
						<th>31-35分钟</th>
						<th>36-40分钟</th>
						<th>41-45分钟</th>
						<th>46-40分钟</th>
						<th>51-55分钟</th>
						<th>56-60分钟</th>
					</tr>
				</thead>
				<tbody>
				<tr><td colspan="17" align="center"><c:if test="${empty zdzList}">暂无数据</c:if></td></tr>
				<c:forEach items="${zdzList}" var="report">
					<tr>
						<td class="a-center">${report.id}</td>
						<td class="a-center">${report.zdzName }</td>
						<td class="a-center">${report.minrf1}</td>
						<td class="a-center">${report.minrf2}</td>
						<td class="a-center">${report.minrf3}</td>
						<td class="a-center">${report.minrf4}</td>
						<td class="a-center">${report.minrf5}</td>
						<td class="a-center">${report.minrf6}</td>
						<td class="a-center">${report.minrf7}</td>
						<td class="a-center">${report.minrf8}</td>
						<td class="a-center">${report.minrf9}</td>
						<td class="a-center">${report.minrf10}</td>
						<td class="a-center">${report.minrf11}</td>
						<td class="a-center">${report.minrf12}</td>
						<td class="a-center">${report.hourrfString}</td>
						<td class="a-center">${report.threehourrf}</td>
						<td class="a-center">${report.dayrfString}</td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
			<div id="temp" style="height: 30px;padding-left:500px;"></div>
			<div>备注：24小时累积雨量表示从当天8:00至当前时间的累积雨量。</div>
			<jsp:include page="flash_zdz.jsp"></jsp:include>
			</div>
		<br />
	</div>
